package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RevenueDonationsMapper;
import com.ruoyi.system.domain.RevenueDonations;
import com.ruoyi.system.service.IRevenueDonationsService;

/**
 * 用户收益Service业务层处理
 * 
 * @author shawu
 * @date 2024-08-16
 */
@Service
public class RevenueDonationsServiceImpl implements IRevenueDonationsService 
{
    @Autowired
    private RevenueDonationsMapper revenueDonationsMapper;

    /**
     * 查询用户收益
     * 
     * @param revenueId 用户收益主键
     * @return 用户收益
     */
    @Override
    public RevenueDonations selectRevenueDonationsByRevenueId(Long revenueId)
    {
        return revenueDonationsMapper.selectRevenueDonationsByRevenueId(revenueId);
    }

    /**
     * 查询用户收益列表
     * 
     * @param revenueDonations 用户收益
     * @return 用户收益
     */
    @Override
    public List<RevenueDonations> selectRevenueDonationsList(RevenueDonations revenueDonations)
    {
        return revenueDonationsMapper.selectRevenueDonationsList(revenueDonations);
    }

    /**
     * 新增用户收益
     * 
     * @param revenueDonations 用户收益
     * @return 结果
     */
    @Override
    public int insertRevenueDonations(RevenueDonations revenueDonations)
    {
        return revenueDonationsMapper.insertRevenueDonations(revenueDonations);
    }

    /**
     * 修改用户收益
     * 
     * @param revenueDonations 用户收益
     * @return 结果
     */
    @Override
    public int updateRevenueDonations(RevenueDonations revenueDonations)
    {
        return revenueDonationsMapper.updateRevenueDonations(revenueDonations);
    }

    /**
     * 批量删除用户收益
     * 
     * @param revenueIds 需要删除的用户收益主键
     * @return 结果
     */
    @Override
    public int deleteRevenueDonationsByRevenueIds(Long[] revenueIds)
    {
        return revenueDonationsMapper.deleteRevenueDonationsByRevenueIds(revenueIds);
    }

    /**
     * 删除用户收益信息
     * 
     * @param revenueId 用户收益主键
     * @return 结果
     */
    @Override
    public int deleteRevenueDonationsByRevenueId(Long revenueId)
    {
        return revenueDonationsMapper.deleteRevenueDonationsByRevenueId(revenueId);
    }
}
